package com.wd.live.view.Fragment

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.wd.live.R
import com.wd.live.base.BaseFragment
import com.wd.live.databinding.FragmentSexBinding
import com.wd.live.viewmodel.SexViewModel


class SexFragment : BaseFragment<SexViewModel,FragmentSexBinding>(R.layout.fragment_sex) {
    override fun dataObserver() {

    }

    override fun initViews() {
        binding.an.setOnCheckedChangeListener { radioGroup, i ->
            when(i){
                R.id.men->{
                    binding.men.background=resources.getDrawable(R.drawable.sex)
                    binding.women.background=resources.getDrawable(R.drawable.sex1)
                }

                R.id.women->{
                    binding.men.background=resources.getDrawable(R.drawable.sex1)
                    binding.women.background=resources.getDrawable(R.drawable.sex)
                }
            }
        }
    }

}